<template>
  <el-dialog
    title="关联中介"
    :visible.sync="dialogValue"
    width="800px"
  >
    <el-form>
      <el-form-item label="">
        <el-rate
          v-model="ruleForm.score"
          :max="5"
          show-score
          text-color="#ff9900"
        />
      </el-form-item>
      <el-form-item label="">
        <el-input clearable v-model="ruleForm.comment" placeholder="请输入评价" class="custom-textarea" type="textarea" :rows="5" />
      </el-form-item>
    </el-form>
    <div slot="footer" class="f-r j-e">
      <el-button @click="dialogValue = false">取消</el-button>
      <el-button type="primary" @click="onSave">确定</el-button>
    </div>
  </el-dialog>
</template>

<script>
import { http_intermediary_app } from '@/api'
export default {
  name: 'User1Add',
  data() {
    return {
      dialogValue: false,
      ruleForm: {
        intermediaryId: '',
        projectId: '',
        eventId: '',
        score: '',
        comment: ''
      }
    }
  },
  methods: {
    open(item) {
      this.ruleForm = {
        intermediaryId: item.id,
        score: '',
        comment: ''
      }
      this.dialogValue = true
    },
    onSave() {
      http_intermediary_app.create(this.ruleForm).then(res => {
        this.$message.success(res.msg)
        this.$emit('get-page')
        this.dialogValue = false
      })
    }
  }
}
</script>
<style>
.custom-textarea .el-textarea__inner{
  background: #F5FAFD;
  border-radius: 18px 18px 18px 18px;
  opacity: 1;
  border: 1px solid #BFBFBF;
}
</style>
